<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="">
  <meta name="format-detection" content="telephone=no">
  <meta name="full-screen" content="yes">
  <meta name="x5-page-mode" content="app">
  <meta name="x5-fullscreen" content="true">
  <meta name="browsermode" content="application">
  <meta content="" name="keywords">
  <meta content="" name="description">
  <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
  <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
  <link rel="stylesheet" href="./js/layer_mobile/need/layer.css">
  <link rel="stylesheet" href="./css/style.css">
  <title>申请进度</title>
  <style>
    .gj-wrap { text-align: center; padding: 36px 20px 0; }
    .gj-icon { display: inline-block; width: 93px; height: 93px; border-radius: 50%; margin-bottom: 30px; }
    .gj-title { height: 32px; font-size: 20px; margin: 0 auto 5px; width: 110px; }
    .gj-desc { height: 22px; font-size: 12px; }
  </style>
</head>
<body>
  <script id="speed_area" type="text/html">
    <div class="weui-msg">
      <!-- 成功 -->
      {{# if(d.status == 2) { }}
        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
          <h2 class="weui-msg__title">申请成功</h2>
          <p class="weui-msg__desc">您的<b>代理申请</b>已通过</p>
          <a href="proxy.html" class="weui-btn weui-btn_primary submit-btn">代理中心</a>
        </div>
      {{# } else if(d.status == 1) { }}
      <!-- 处理中 -->
      <div class="weui-msg__icon-area"><i class="weui-icon-waiting weui-icon_msg"></i></div>
      <div class="weui-msg__text-area">
        <h2 class="weui-msg__title">申请处理中</h2>
        <p class="weui-msg__desc">您的<b>代理申请</b>我们正紧罗密布的处理中</p>
      </div>
      {{# } else if(d.status == 3) { }}
      <!-- 失败 -->
      <div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
      <div class="weui-msg__text-area">
        <h2 class="weui-msg__title">申请驳回</h2>
        {{# if(d.info) { }}
        <p class="weui-msg__desc">{{ d.info }}</p>
        {{# } }}
      </div>
      {{# } else if(d.status == -1) { }}
      <!-- 禁用 -->
      <div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
      <div class="weui-msg__text-area">
        <h2 class="weui-msg__title">账号禁用</h2>
        <p class="weui-msg__desc">您的账号已被禁用</p>
      </div>
      {{# } else { }}
      <!-- 其他状态 -->
      <div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
      <div class="weui-msg__text-area">
        <h2 class="weui-msg__title">没有信息</h2>
        <p class="weui-msg__desc">没有找到关于您的<b>代理申请</b>信息。</p>
      </div>
      {{# } }}
  
      
      <div class="weui-msg__extra-area">
        <div class="weui-footer">
          <p class="weui-footer__text">Copyright © 天空文化传播</p>
        </div>
      </div>
    </div>
  </script>
  <div id="speed_wrap">
    <!-- 骨架图 -->
    <div class="gj-wrap">
      <span class="gj-icon paragraph"></span>
      <div class="gj-title paragraph"></div>
      <div class="gj-desc paragraph"></div>
    </div>
  </div>


  <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
  <script src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js"></script>
  <script src="./js/tools2.js?ver=2.1"></script>
  <script src="./js/jweixin-1.4.0.js?ver=1.0"></script>
  <script src="./js/layer_mobile/layer.js"></script>
  <script src="./js/layer_mobile/laytpl.js"></script>
  <script>
    // var vConsole = new VConsole();
    var mid = tools.getItem('userInfo').user_code;   // 用户id
    var speedArea = $('#speed_area').html();
    $(function() {
      tools.login(function() {
        getSpeed()
      })
    })

    function getSpeed() {
      tools.ajax({
        url: "/proxy/" + mid,
        success: function(res) {
          if(res.code == 0) {
            laytpl(speedArea).render(res.data, function(html) {
              $('#speed_wrap').html(html);
            })
          } else {
            laytpl(speedArea).render({ status: -9 }, function(html) {
              $('#speed_wrap').html(html);
            })
          }
        }
      })
    }

    tools.hide();
  </script>
</body>
</html>